<?php
/**
 * 公共查单模块 PC端
 */
if (!defined('IN_CRONLITE')) die();

?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><?= '订单管理 - ' . $conf['sitename'].($conf['title']==''?'':' - '.$conf['title'])  ?></title>
    <meta name="keywords" content="<?= $conf['keywords'] ?>">
    <meta name="description" content="<?= $conf['description'] ?>">
    <!-- Vendor styles -->
    <link rel="icon" href="<?php echo $cdnserver; ?>assets/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
</head>
<body>
<style>
    .qt-header {
        display: none;
        height: 4em;
        line-height: 4em;
        box-shadow: 3px 3px 16px #eee;
        margin: 1em;
        font-size: 1.1em;
    }

    .qt-header > input {
        height: 2.5em;
        width: 100%;
        border: none;
        text-indent: 2.5em;
        border-radius: 0.5em;
        font-size: 0.9em;
    }

    .qt-header > span {
        position: absolute;
        margin-left: 0.8em;
        font-size: 0.9em;
    }

    .qt-card {
        box-shadow: 0px 0px 6px #e5e8eb;
        border-radius: 0.5em;
    }

    .qt-card img {
        width: 6em;
        max-width: 100%;
        height: 6em;
        border-radius: 0.5em;
        box-shadow: 3px 3px 16px #eee;
    }

    .qt-btn {
        border-radius: 0.5em;
        border: solid 1px #eee;
    }

    @media screen and (min-width: 960px) {
        .comme {
            width: 60%;
            margin-top: 1em;
            margin-bottom: 1em;
        }

        body {
            <?= background::image() == false ? 'background:#f5f5f5;' : background::image() ?>;
        }
    }
</style
<body>
<div class="layui-fluid comme" style="opacity:0.98;padding: 0">
    <div class="layui-row">
        <div class="layui-col-md12" style="color: #111">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 0">
                    <div class="layui-card">
                        <div class="layui-card-header"
                             style="text-align: center;font-size: 1rem;box-shadow: 3px 3px 16px #eee;color: #333;margin-bottom: 0.3rem;">
                            订单管理
                            <a href="javascript:hiset()"
                               class="layui-icon layui-icon-search" id="sicon" style="position:absolute;left: 1rem"></a>
                        </div>
                        <div class="layui-card-header qt-header">
                    <span class="layui-icon layui-icon-search"
                          onclick="OrderManagement.OrderQuery('OrderAll',$('#query').val())"></span>
                            <input type="text" id="query"
                                   onkeydown="if(event.keyCode==13){OrderManagement.OrderQuery('OrderAll',$('#query').val())}"
                                   placeholder="搜索我的订单" autocomplete="off">
                        </div>
                        <div class="layui-card-body" style="padding: 0">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <ul class="layui-tab-title" style="text-align: center">
                                    <li class="layui-this">已提交订单</li>
                                    <li>待提交订单</li>
                                    <li>订单查询</li>
                                    <li onclick="location.href = './?mod=extract';">卡密提取</li>
                                </ul>
                                <div class="layui-tab-content"
                                     style="padding: 1em;padding-bottom: 3em;overflow:hidden;overflow-y: auto;">
                                    <?php if ($conf['notice_check'] != '') { ?>
                                        <div style="width: 100%;min-height: 3em;padding: 1em;box-shadow: 0px 0px 16px #eee;border-radius: 0.5em;margin-bottom: 1em;">
                                            <?= $conf['notice_check'] ?>
                                        </div>
                                    <?php } ?>
                                    <div class="layui-tab-item layui-show" id="order_all"></div>
                                    <div class="layui-tab-item" id="order_a"></div>
                                    <div class="layui-tab-item">
                                        <div class="layui-card">
                                            <div class="layui-card-body">

                                                <div class="layui-form layui-form-pane">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">下单信息</label>
                                                        <div class="layui-input-block">
                                                            <input type="text" id="vae"
                                                                   onkeydown="if(event.keyCode==13){merchandise.query_sep($('#vae').val())}"
                                                                   required lay-verify="required" placeholder="请填写下单信息！"
                                                                   autocomplete="off"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                    <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid layui-btn-radius layui-btn-sm"
                                                            style="background-color: white;color: #666;border: 1px solid #000"
                                                            id="submit_query">
                                                        查询未绑定用户的订单
                                                    </button>
                                                    <div id="content_query"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-md12" style="box-shadow: 0px 0 6px #eee;">
            <div class="layui-card">
                <div class="layui-card-body layui-text" style="text-align: center">
                    <p><?= $conf['notice_check'] ?></p>
                    <p>© <?= $conf['sitename'] ?>. All rights reserved.</p>
                    <?= $conf['notice_bottom'] ?>
                    <p><?= $conf['statistics'] ?></p>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="<?= $cdnpublic ?>jquery/3.4.1/jquery.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
<script src="<?php echo $cdnserver; ?>assets/js/main.js?var=<?= $accredit['versions'] ?>"></script>
<script>logo = "<?=$conf['logo']?>"</script>
<script src="/template/public/template.js?var=<?= $accredit['versions'] ?>"></script>
<script>
    OrderManagement.OrderQuery('OrderAll'); // 进入页面查询全部订单
    function hiset() {
        var display = $('.qt-header').css('display');
        if (display == 'none') {
            $('.qt-header').show(200);
            $("#sicon").attr('class','layui-icon layui-icon-up');
        } else{
            $('.qt-header').hide(200);
            $("#sicon").attr('class','layui-icon layui-icon-search');
        }
    }
    layui.use('flow', function(){
        var flow = layui.flow;
        flow.lazyimg();
    });
</script>
</html>
